#! /bin/bash

checkError() {
    error=$?

    if [ $error -ne 0 ]; then
        echo "found error: $error"
        exit $error
    fi
}

rm -rf ./dist
mkdir -p ./dist/include/dc
# mkdir -p ./dist/include/di
mkdir -p ./dist/include/uml
mkdir -p ./dist/include/umldi
mkdir -p ./dist/include/umlcore
cp ./dc/*.h dist/include/dc/
# cp ./di/*.h dist/include/di/
cp ./uml/*.h dist/include/uml/
cp ./umldi/*.h dist/include/umldi/
cp ./umlcore/*.h dist/include/umlcore/
cp ./*.h dist/include/


mkdir -p ./dist/bin
mkdir -p ./dist/lib

cp ./x64/Debug/*.dll dist/bin
cp ./x64/Debug/*.lib dist/lib
cp ./x64/Debug/UmlModeld.pdb dist/bin

cp ./x64/Release/*.dll dist/bin
cp ./x64/Release/*.lib dist/lib